﻿<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%option explicit%>
<%
Dim RZ_IN
RZ_IN=1
%>
<!--#include file="../conn.inc.asp" -->
<!--#include file="admin_inc/admin.function.asp" -->
<!--#include file="admin_inc/admin.sqlfunction.asp" -->
<%
checkadmin(1)
dim id,name,url,logo,description,theorder,author
id=GetIntQueryString("id")
author=session("user_name")
theorder=0
if id>0 then
	dim rsa,sqla
	set rsa = server.createobject("adodb.recordset")
	sqla = "select * from [c_friendlink] where id="&id
	rsa.open sqla,conn,1,1
	if rsa.eof or rsa.bof then 
	response.redirect("showmsg.asp?from=friendlink_list.asp&msg=norecord")
	else
	name=rsa("name")
	url=rsa("url")
	logo=rsa("logo")
	description=rsa("description")
	theorder=rsa("theorder")
	end if 
	rsa.close
	set rsa=nothing 
end if
%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加/修改友情链接</title>
<script type="text/javascript" src="admin_js/common.js"></script>
<script type="text/javascript" src="admin_js/dateselect.js"></script>
<link type="text/css" href="style/style.css" rel="stylesheet" rev="stylesheet"/>
</head>
<body>
<form method="post" name="rzform" action="friendlink_save.asp">
<table class="table_800" cellspacing="0" cellpadding="0">
<%if id>0 then%>
<input type="hidden" name="act" value="modifysave"/>	
<input type="hidden" name="id" value="<%=id%>"/>	
<%else%>
<input type="hidden" name="act" value="addsave"/>	
<%end if%>
<input type="hidden" name="author" value="<%=author%>"/>
<tr>
	<th colspan="2"><%if id>0 then%>修改<%else%>添加<%end if%>友情链接</th>
</tr>
<tr class="row" id="tr_ad_alt">
	<td>网站名称</td>
	<td><input type="text" id="name" name="name" value="<%=name%>"/> <span class="redstar">*</span></td>
</tr>
<tr  class="row" id="tr_ad_link">
	<td>网址</td>
	<td><input type="text" id="url"  name="url" value="<%=url%>"/> <span class="redstar">*</span> 说明：须使用以http://开头的地址</td>
</tr>
<tr  class="row" id="tr_ad_imgswf">
	<td>LOGO</td>
	<td>
	<input type="text" name="logo"  style="background-color:#cccccc;" id="logo" size="30"  value="<%=logo%>"/> <%if logo<>"" then%><a href="<%=logo%>" target="_blank">[查看]</a><%end if%><input type="button" id="copyimg" name="copyimg" value="从已上传图片中选取" onclick="openWin('selectphoto.asp?photobox=logo',840,500);" style="display:none;"/><br/>
<iframe id="uploadframe" marginwidth="0" marginheight="0" frameborder="0" style="width:400px;height:30px" src="rzupload.asp?parentform=rzform&inputname=logo" scrolling="no"></iframe>
	</td>
</tr>
<tr  class="row" id="tr_ad_link">
	<td>排序</td>
	<td><input type="text" size="3" id="theorder"  name="theorder" value="<%=theorder%>"/> <span class="redstar">*</span> 请填写0或正整数</td>
</tr>
<tr class="row"  id="tr_ad_code">
	<td>简单描述</td>
	<td><textarea id="description" name="description" cols="30" rows="5"><%=description%></textarea><br/></td>
</tr>
<tr>
	<td colspan="2" class="tdcenter">
	<input type="button" class="btn" onclick="checkForm('addfriendlink');" value="保存"/>&nbsp;&nbsp;&nbsp;<input class="btn" type="reset" value="重置"/></td>
</tr>
</table>
</form>
</body>
</html>
